Skip to content

fix(issue): support share issue URLs#718

Draft
BYK wants to merge 1 commit intomainfrom
fix/share-issue-urls
Draft

fix(issue): support share issue URLs#718
BYK wants to merge 1 commit intomainfrom
fix/share-issue-urls

Conversation

@BYK
Copy link
Copy Markdown
Member

@BYK BYK commented Apr 11, 2026

Summary

  • Resolves CLI-T4: share issue URLs like https://{org}.sentry.io/share/issue/{shareId}/ now work with sentry issue view, explain, and plan
  • Two-step resolution: public share API → numeric group ID → authenticated full-issue fetch
  • Supports SaaS subdomain, bare sentry.io, self-hosted, and region subdomain share URLs

How it works

  1. URL parsing (sentry-url-parser.ts): New matchSharePath() + share branch in matchSubdomainOrg() recognize /share/issue/{shareId}/ paths
  2. Arg parsing (arg-parsing.ts): New "share" variant in ParsedIssueArg carries shareId, optional org, and baseUrl
  3. API (api/issues.ts): getSharedIssue() calls the public GET /api/0/shared/issues/{shareId}/ endpoint (no auth needed) to get the groupID
  4. Resolution (issue/utils.ts): resolveShareIssue() fetches groupID via share API, then uses the authenticated API for full issue details with proper region routing

Type change

ParsedSentryUrl.org is now optional since share URLs on bare domains lack org context. Guards added in issueArgFromUrl(), orgProjectFromUrl(), and event/view.ts.

Resolve Sentry share URLs (e.g., https://{org}.sentry.io/share/issue/{id}/)
by threading support through the URL parsing, argument parsing, and issue
resolution pipeline.

Two-step resolution: call the public share API endpoint to get the numeric
group ID, then fetch full details via the authenticated API.

Changes:
- Add shareId field and matchSharePath() to sentry-url-parser.ts
- Add "share" variant to ParsedIssueArg in arg-parsing.ts
- Add getSharedIssue() API function (public endpoint, no auth)
- Add resolveShareIssue() and "share" case in issue resolution
- Make org optional on ParsedSentryUrl (share URLs may lack org)
- Guard org access in event/view.ts for type safety
@github-actions
Copy link
Copy Markdown
Contributor

Semver Impact of This PR

🟢 Patch (bug fixes)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


Bug Fixes 🐛

  • (issue) Support share issue URLs by BYK in #718

Internal Changes 🔧

  • Regenerate skill files by github-actions[bot] in ca16b2ff

🤖 This preview updates automatically when you update the PR.

@github-actions
Copy link
Copy Markdown
Contributor

PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://cli.sentry.dev/_preview/pr-718/

Built to branch gh-pages at 2026-04-11 21:32 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@github-actions
Copy link
Copy Markdown
Contributor

Codecov Results 📊

134 passed | Total: 134 | Pass Rate: 100% | Execution Time: 0ms

📊 Comparison with Base Branch

Metric Change
Total Tests
Passed Tests
Failed Tests
Skipped Tests

✨ No test changes detected

All tests are passing successfully.

✅ Patch coverage is 89.13%. Project has 1597 uncovered lines.
❌ Project coverage is 95.31%. Comparing base (base) to head (head).

Files with missing lines (2)
File Patch % Lines
src/lib/api/issues.ts 72.00% ⚠️ 7 Missing
src/lib/arg-parsing.ts 83.33% ⚠️ 3 Missing
Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
- Coverage    95.32%    95.31%    -0.01%
==========================================
  Files          232       232         —
  Lines        33951     34037       +86
  Branches         0         0         —
==========================================
+ Hits         32361     32440       +79
- Misses        1590      1597        +7
- Partials         0         0         —

Generated by Codecov Action

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant